package routers

import (
	"057dg/controllers"
	_"057dg/models"
	"github.com/astaxie/beego"
)


func init() {
		 home := beego.NewNamespace("/home",
		 		beego.NSRouter("/", &controllers.HomeController{}, "*:Get"),
		 		beego.NSRouter("/login", &controllers.HomeController{}, "*:Login"),
		 		beego.NSRouter("/regedit", &controllers.HomeController{},"*:Regedit"),
		 		beego.NSRouter("/checkEmail", &controllers.HomeController{}, "*:CheckEmail"),
		)
		beego.AddNamespace(home)

		job := beego.NewNamespace("/job",
				beego.NSRouter("/", &controllers.JobController{}, "*:Get"),
				beego.NSRouter("/detail", &controllers.JobController{}, "*:Detail"),
		)
		beego.AddNamespace(job)


		company := beego.NewNamespace("/company",
				beego.NSRouter("/", &controllers.CompanyController{}, "*:Get"),
				beego.NSRouter("/detail", &controllers.CompanyController{}, "*:Detail"),
		)
		beego.AddNamespace(company)

		account := beego.NewNamespace("/account",
				beego.NSRouter("/", &controllers.AccountController{}, "*:Get"),
				beego.NSRouter("/post", &controllers.AccountController{}, "*:Post"),
				beego.NSRouter("/editavatar", &controllers.AccountController{}, "*:Editavatar"),
				beego.NSRouter("/uploadChangeHead", &controllers.AccountController{}, "*:UploadChangeHead"),
				beego.NSRouter("/uploadTrueHead", &controllers.AccountController{}, "*:uploadTrueHead"),
		)
		beego.AddNamespace(account)

		// beego.Router("/", &controllers.HomeController{},"*:Get")
		// beego.Router("/login", &controllers.HomeController{},"*:Login")
		// beego.Router("/regedit", &controllers.HomeController{},"*:Regedit")
}
